package dao;

import pojo.Department;
import pojo.Permission;

import java.util.List;

public interface PermissionDao {

    /**
     * 按条件查询所有权限的方法
     * @return
     */
    public List<Permission> listPermissionByParam(Permission permission);

    /**
     * 按条件查询所有权限的个数
     * @return
     */
    public Integer countListPermissionByParam(Permission permission);

    /**
     * 通过部门编号查询权限
     * @param permissionCode
     * @return
     */
    public Permission findPermissionByCode(String permissionCode);

    /**
     * 通过部门编号查询权限
     * @param departmentCode
     * @return
     */
    public Department findPermissionByDC(String departmentCode);

    /**
     * 职位的修改权限
     * @param departmentCode
     * @param departmentPermission
     * @return
     */
    public Integer editPermission(String departmentCode, String departmentPermission);


}
